//玩家数据
class PlayerDataModel {
    private friendDbid : KBEngine.UINT64;       //好友dbid(当前正在其农场)
    private isSelfFarm = true;      //当前是否是本人的农场
    private avatarUrl = "";         //头像
    private score = 0;              //积分
    private nickName = "";          //昵称

    constructor() {
        this.friendDbid = new KBEngine.UINT64(0, 0);
    }

     SetFriendDbid(friendDbid:KBEngine.UINT64) {
        this.friendDbid = friendDbid;
        this.isSelfFarm = false;
    }

    GetFriendDbid() : KBEngine.UINT64 {
        return this.friendDbid;
    }

    ClearFriendDbid() {
        this.friendDbid.lo = 0;
        this.friendDbid.hi = 0;
        this.isSelfFarm = true;
    }

    IsSelfFarm() : Boolean {
        return this.isSelfFarm;
    }

    SetAvatarUrl(avatarUrl:string) {
        this.avatarUrl = avatarUrl;
    }

    GetAvatarUrl() : string {
        return this.avatarUrl;
    }

    SetScore(score:number) {
        this.score = score;
    }

    GetScore() : number {
        return this.score;
    }

    SetNickName(nickName:string) {
        this.nickName = nickName;
    }

    GetNickName() {
        return this.nickName;
    }
}
let PlayerModel = new PlayerDataModel();